import React, {Component} from 'react';
import {Outlet,Link} from 'react-router-dom'

class Goods extends Component {
    componentDidMount() {
        // console.log(useLocation())
    }

    render() {
        return (
            <div>
                <div>产品页面</div>
                <Link to={"/goods/info"}>跳转子路由</Link><br/>
                <div>
                    <h5>这里自动显示子路由</h5>
                    <Outlet></Outlet>
                </div>
            </div>
        );
    }
}

// function Goods(props) {
//     const {id} = useParams()
//     return (
//         <div>{id}</div>
//     );
// }


export default Goods;